package com.xqboss.apps.service.user;

import com.xqboss.apps.domain.user.SysUserWrenchRecord;
import com.xqboss.apps.domain.user.UserIdentityRank;
import com.xqboss.apps.mapper.user.SysUserWrenchRecordMapper;
import com.xqboss.apps.service.user.SysUserWrenchRecordService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xqboss.apps.vo.user.HotBeansGiveBeforeVo;
import org.springframework.stereotype.Service;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import com.xqboss.chain.domain.chain.dto.BaseRequest;
import java.util.List;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;

/**
 * <p>
 * 扳手转增记录表 服务实现类
 * </p>
 *
 * @author 木鱼
 * @since 2024-01-22
 */
@Service
@Slf4j
@RequiredArgsConstructor
public class SysUserWrenchRecordService extends ServiceImpl<SysUserWrenchRecordMapper, SysUserWrenchRecord> {
    public List<SysUserWrenchRecord> selectBasicList(BaseRequest request) {
        return baseMapper.selectList(Wrappers.<SysUserWrenchRecord>lambdaQuery());
    }

    public SysUserWrenchRecord selectByIdBasic(Long id) {
        return baseMapper.selectById(id);
    }

    public boolean saveBasic(SysUserWrenchRecord record) {
        return baseMapper.insert(record) > 0;
    }

    public boolean updateBasic(SysUserWrenchRecord record) {
        return baseMapper.updateById(record) > 0;
    }

    public boolean removeBasic(Long id) {
        return baseMapper.deleteById(id) > 0;
    }

}